package com.wave.wavesystem.server.service;

import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.wave.wavesystem.core.service.WaveService;
import com.wave.wavesystem.server.pojo.dto.ArticleQueryRequest;
import com.wave.wavesystem.server.pojo.entity.ArticleEntity;
import com.wave.wavesystem.server.pojo.vo.article.ArticleHomeCardVO;
import com.wave.wavesystem.server.pojo.vo.article.ArticleServerTableVO;

/**
 * @author 夕下风波
 * @date 2025-02-23
 * @description 文章表 业务层接口
 */
public interface ArticleService extends WaveService<ArticleEntity> {

    Page<ArticleServerTableVO> adminPage(Page<ArticleEntity> page, QueryWrapper queryWrapper);

    /**
     * 自定义保存
     *
     * @param article 保存内容
     * @return 返回带id的实体
     */
    ArticleEntity mySave(ArticleEntity article);

    /**
     * 查询内容
     *
     * @param articleQueryRequest
     * @return
     */
    Page<ArticleHomeCardVO> getHomeCardPage(ArticleQueryRequest articleQueryRequest);

}
